package com.lqq.eduservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lqq.eduservice.entity.EduCourse;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lqq.eduservice.entity.frontvo.CourseFrontVo;
import com.lqq.eduservice.entity.frontvo.CourseWebVo;
import com.lqq.eduservice.entity.vo.CourseInfoVo;
import com.lqq.eduservice.entity.vo.CoursePublishVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author testjava
 * @since 2021-06-29
 */
public interface EduCourseService extends IService<EduCourse> {

    String saveCourseInfo(CourseInfoVo courseInfoVo);

    CourseInfoVo getCourseInfo(String courseId);

    void updateCourseInfo(CourseInfoVo courseInfoVo);

    CoursePublishVo publishCourseInfo(String id);

    //根据id删除课程，级联删除，需要先删除 小节表——》章节表 ——》课程描述表 ——》课程表
    void removeCourse(String id);

    //查询前台首页讲师redis
    List<EduCourse> getIndexCourse();

    //条件查询带分页查询课程
    Map<String, Object> getFrontCourseList(Page<EduCourse> pageCourse, CourseFrontVo courseFrontVo);

    //根据课程id，编写SQL查询课程信息
    CourseWebVo getBaseCourseInfo(String courseId);
}
